import { configureStore } from '@reduxjs/toolkit'
import reducer from './reducers'

const store = configureStore({
  // 主 reducer，可以合并多个 reducer
  reducer
})

// 检测
store.subscribe(() => {
  console.log('state 发生了变化：', store.getState())
})
export default store
